Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make InferTypes error on enable conditions > 1-bit wide #2182

Merged
merged 1 commit into from
Apr 16, 2021
Merged

Conversation

jackkoenig
Copy link
Contributor

Fixes #2093

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • [NA] Did you update the FIRRTL spec to include every new feature/behavior?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • bug fix

API Impact

FIRRTL will now correctly error when a mux/when/other condition is too wide

Backend Code Generation Impact

No impact

Desired Merge Strategy

  • Squash

Release Notes

FIRRTL no longer accepts when, mux, and simulation statement conditions that wider than 1-bit.

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@jackkoenig jackkoenig added this to the 1.4.x milestone Apr 16, 2021
@jackkoenig jackkoenig force-pushed the fix-2093 branch 2 times, most recently from 8a4b846 to edda4a0 Compare April 16, 2021 16:45
Copy link
Contributor

@ekiwi ekiwi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

It now follows the written spec more closely:

The condition must have a 1-bit unsigned integer type.

(from the section on conditionals)

@jackkoenig jackkoenig merged commit bf1cf3d into master Apr 16, 2021
@jackkoenig jackkoenig deleted the fix-2093 branch April 16, 2021 18:41
mergify bot pushed a commit that referenced this pull request Apr 16, 2021
@mergify mergify bot added the Backported This PR has been backported to marked stable branch label Apr 16, 2021
mergify bot added a commit that referenced this pull request Apr 16, 2021
(cherry picked from commit bf1cf3d)

Co-authored-by: Jack Koenig <koenig@sifive.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported to marked stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-bit Mux/When Conditionals are Accepted
2 participants